# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=proctal
pkgver=477.f72cefe
pkgrel=3
pkgdesc='Provides a command line interface and a C library to manipulate the address space of a running program on Linux.'
url='https://github.com/daniel-araujo/proctal'
arch=('x86_64' 'aarch64')
groups=('blackarch' 'blackarch-binary' 'blackarch-misc')
license=('GPL3')
depends=('keystone' 'capstone')
makedepends=('git' 'yuck' 'php')
source=("git+https://github.com/daniel-araujo/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  unset CPPFLAGS
  unset CFLAGS
  #autoreconf -i
  #./init
  ./bootstrap
  ./configure --prefix=/usr
  make
}

package() {
  cd $pkgname

  make DESTDIR="$pkgdir" install

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname" README.rst CONTRIBUTING
  install -Dm 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}

